load("@rules_python//python:defs.bzl", "py_binary")

py_binary(
    name = "gen-git-assembly-info",
    srcs = ["gen-git-assembly-info.py"],
    deps = ["@rules_python//python/runfiles"],
)

py_binary(
    name = "gen-assembly-info",
    srcs = ["gen-assembly-info.py"],
    visibility = ["//csharp:__subpackages__"],
    deps = ["@rules_python//python/runfiles"],
)

genrule(
    name = "git-assembly-info-src",
    srcs = ["@semmle_code//:git_info"],
    outs = ["GitAssemblyInfo.cs"],
    cmd = "$(execpath :gen-git-assembly-info) $@ $(SRCS)",
    tools = [":gen-git-assembly-info"],
    visibility = ["//csharp:__subpackages__"],
)
